#ifndef LOGIN_SERVER_H
#define LOGIN_SERVER_H

#include "i_connection_listener.h"
#include "I_auth_requester.h"
#include "login_auth_delegate.h"

namespace login_server_detail
{
	class Imp;
}

class LoginServer : public IConnectionListener
{
	boost::shared_ptr<IAuthRequester> authRequester_;
	LoginAuthDelegate successDelegate_;
	LoginAuthDelegate failedDelegate_;
public:
	virtual void onNewConnectionConnected(UPeer::Ptr upeer);
	void setAuthRequester(boost::shared_ptr<IAuthRequester> authRequester);

	inline void setLoginFailedDelegate(LoginAuthDelegate loginFailed);
	inline void setLoginSuccessDelegate(LoginAuthDelegate loginSuccessed);
};

#endif